const cookies = {
    data() {
        return {
            acceptCookies: false
        }
    },
    mounted() {
        if (localStorage.getItem('__accept__Cookies_')) {
            this.acceptCookies = true
        }
    },
    methods: {
        handleAcceptCookies() {
            this.acceptCookies = true
            localStorage.setItem('__accept__Cookies_', 1)
        }
    },
    template: `
    <div class="cookies" v-if="!acceptCookies">
        <span>Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
            To find out more, including how to control cookies, see here: Privacy Policy</span>
        <button @click="handleAcceptCookies">Accept all cookies</button>
    </div>
    `
}